import service from "@/utils/request";
import type { IRes, IResPage } from "./api";

export interface IBaseTrademark {
  id: number;
  tmName: string;
  logoUrl: string;
}

export function requestBaseTrademarkByPage(page = 1, limit = 5) {
  return service.get<any, IResPage<IBaseTrademark>>(
    `/product/baseTrademark/${page}/${limit}`
  );
}

export function requestSaveBaseTrademark(data: Omit<IBaseTrademark, "id">) {
  return service.post<any, null>("/product/baseTrademark/save", data);
}

export function reqChangeTrademark(data: IBaseTrademark) {
  return service.put<any, null>("product/baseTrademark/update", data);
}

export function reqDelOneTrademark(id: number) {
  return service.delete<any, null>(`/product/baseTrademark/remove/${id}`);
}
